package com.example.yckjbigdataflink.model;

import java.io.Serializable;

/*
假设你的 HBase 表中存储了用户行为日志，结构类似于：
| rowkey                | uid       | actionType | eventTime     | ip      |
| --------------------- | --------- | ---------- | ------------- | ------- |
| u\_001\_1710000000000 | user\_001 | click      | 1710000000000 | 1.2.3.4 |


| 字段名          | 类型     | 含义           |
| ------------ | ------ | ------------ |
| `uid`        | String | 用户 ID        |
| `actionType` | String | 行为类型（点击、浏览等） |
| `eventTime`  | long   | 行为时间戳（毫秒）    |
| `ip`         | String | 用户操作来源 IP 地址 |

 */
public class UserAction implements Serializable {
    private String uid;
    private String actionType;
    private long eventTime;
    private String ip;

    public UserAction() {}

    public UserAction(String uid, String actionType, long eventTime, String ip) {
        this.uid = uid;
        this.actionType = actionType;
        this.eventTime = eventTime;
        this.ip = ip;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getActionType() {
        return actionType;
    }

    public void setActionType(String actionType) {
        this.actionType = actionType;
    }

    public long getEventTime() {
        return eventTime;
    }

    public void setEventTime(long eventTime) {
        this.eventTime = eventTime;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Override
    public String toString() {
        return "UserAction{" +
                "uid='" + uid + '\'' +
                ", actionType='" + actionType + '\'' +
                ", eventTime=" + eventTime +
                ", ip='" + ip + '\'' +
                '}';
    }
}

